<?php
class ItemsCarousel extends CWidget
{
	public $category; 
	
    public function init()
    {
        $data = Content::model()->findAllByAttributes(array('category_id'=>$this->category), array('order'=>'crdate DESC', 'limit' => '5'));
        $this->render('ItemsCarousel', 
        	array('data' => $data)
        );
    }
}
?>